package com.grass.cropTradingCenter.repository;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.grass.cropTradingCenter.domain.repository.GoodsPackageRepository;
import com.grass.cropTradingCenter.mapper.GoodsPackageMapper;
import com.grass.cropTradingCenter.pojo.entity.GoodsPackage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsPackageRepositoryImpl implements GoodsPackageRepository {
    @Autowired
    GoodsPackageMapper goodsPackageMapper;


    @Override
    public List<GoodsPackage> getGoodsPackageByGoodsId(Integer goodsId) {
        LambdaQueryWrapper<GoodsPackage> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(GoodsPackage::getGoodsId, goodsId);

        return goodsPackageMapper.selectList(queryWrapper);
    }
}
